
#ifndef MEMORYWRAPPER_H_
#define MEMORYWRAPPER_H_

#include "../Packets/PubPkt.h"
#include "../Common/Consts.h"
#include "Cache.h"
#include "SimpleIndexingCache.h"
#include "Database.h"
#include "Disk.h"
#include <set>
#include <iostream>
#include "../Interface/ConfigHandler.h"

class MemoryWrapper {

public:

	MemoryWrapper(StorageType parStorage, IndexingType parIndexing);

	virtual ~MemoryWrapper();

	bool insert(PubPkt *pkt, key_t k);

	bool remove(std::pair<timestamp_t, key_t> key);

	void extract(int type, Constraint* parCostraint, int parNumConstraint, timestamp_t parEntryTimestamp, float window, OccurrenceType occurrence, std::set<PubPkt*> &resultSet);

private:

	StorageType storage;
	IndexingType indexing;

	Cache *cache;
	SimpleIndexingCache *simpleIndexingCache;
	Database *database;
	Disk *disk;


};


#endif /* MEMORYWRAPPER_H_ */
